/**  
 * All rights Reserved, Designed By <a href="www.itttq.com" target="_blank">www.itttq.com</a>
 * @date:   2017-07-21 11:42:21
 * @Copyright: 2017 <a href="www.itttq.com" target="_blank">www.itttq.com</a> Inc. All rights reserved. 
 */
package com.itttq.gshop.pbpm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Lang;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import com.itttq.gshop.domain.po.PayApplyPo;
import com.itttq.gshop.pbpm.cmpt.mybatis.CustomInLanguage;
import com.itttq.gshop.pbpm.provider.PayApplySqlProvider;

@Mapper
public interface IPayApplyMapper {
	/**
	 * 新增PayApplyPo对象
	 * 
	 * @param PayApplyPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@InsertProvider(type=PayApplySqlProvider.class,  method="addPayApply") 
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public Integer addPayApply(PayApplyPo payApply);

	/**
	 * 更新PayApplyPo对象
	 * 
	 * @param payApplyPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@UpdateProvider(type=PayApplySqlProvider.class,  method="updatePayApply") 
	public Integer updatePayApply(PayApplyPo payApply);
	
	/**
	 * 根据ID删除PayApplyPo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 * @return Integer
	 */
	@DeleteProvider(type=PayApplySqlProvider.class,  method="delPayApply") 
	public Integer delPayApplyById(Integer id);

	/**
	 * 根据IDS删除PayApplyPo对象
	 * 
	 * @param ids
	 * @Author 迷蝶
	 * @return List<PayApplyPo>
	 */
	@Lang(CustomInLanguage.class)
	@Delete("DELETE FROM pay_apply WHERE id IN (#{ids})")
	public Integer delPayApplyByIds(@Param("ids") List<Integer> ids);
	
	/**
	 * 根据条件查找PayApplyPo对象，默认根据ID降序
	 * 
	 * @param payApplyPo
	 * @Author 迷蝶
	 * @return List<PayApplyPo>
	 */
	@SelectProvider(type=PayApplySqlProvider.class,  method="findPayApplys") 
	public List<PayApplyPo> findPayApplys(PayApplyPo payApply);
	
	/**
	 * 根据条件查找记录总数
	 * 
	 * @param payApplyPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@SelectProvider(type=PayApplySqlProvider.class,  method="findPayApplyCount") 
	public Integer findPayApplyCount(PayApplyPo payApply);

	/**
	 * 根据ID查找PayApplyPo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 * @return PayApplyPo
	 */
	@SelectProvider(type=PayApplySqlProvider.class,  method="findPayApplyById") 
	public PayApplyPo findPayApplyById(Integer id);
	
}